/**
 * @author scylla
 * @version V1.0
 * @Project echo-java-base
 * @Title 副本管理者实例
 * @Description *
 * @Package concurrent.mthread.synchronizeCodeBlock
 * @Since 2021/8/18 2:48 下午
 */
package concurrent.mthread.synchronizeCodeBlock;

public class PairManager2 extends PairManager {


    @Override
    void increment() {
        Pair temp;
        synchronized (this) {
            p.incrementX();
            p.incrementY();
            temp = getPair();
        }
        store(temp);
    }
}
